import http from '../utils/request'

// 请求首页数据
export const getData = () => {
    // 返回一个 promise 对象
    return http.get('/home/getData')
}

// 请求用户数据
export const getUser = (params) => {
    console.log(params, "params")
    
    return http.get('/user/getUserList', params)
}
export const addUser = (data) => {
    console.log(data,"add")

    return http.post('/user/add', data)
}
export const editUser = (data) => {
    console.log(data, "edit")
    return http.post('/user/edit', data)
}
export const delUser = (data) => {
    return http.post('/user/del', data)
}
// 获取用户登录信息接口
export const getMenu = (data) => {
    return http.post('/permission/getMenu', data)
}